#ifndef TABLE_DELEGATE_H
#define TABLE_DELEGATE_H
#include <QStyledItemDelegate>
#include <QObject>
#include <QEvent>
struct TableItemm;
class TableDelegate : public QStyledItemDelegate
{
    Q_OBJECT
public:
    TableDelegate(QObject *parent = nullptr);
    virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
    virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
    virtual bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override;
signals:
    void doubleClicked(const QModelIndex &index,int position);
};

#endif // TABLE_DELEGATE_H
